package cqrtplm.constant;

import com.ty.basic.exception.message.ErrorCodeEnum;

/**
 * Description 自定义错误枚举类
 *
 * @auther: xxx
 * @date: xxx
 */

public enum RTErrorCodeEnum implements ErrorCodeEnum {

    // 文档类型转换异常
    DOC_TYPE_ERROR("rtplm_error_00001", "rtplm.doc.type.error"),
    USER_NOT_EXIST("rtplm_error_00002", "user.not.exist.error"),
    DRAWING_CODE_NAME_ERROR("rtplm_error_00003", "drawing.code.name.error"),
    EXCEL_EXPORT_EXCEPTION("rtplm_error_00004", "excel.export.exception"),
    NOT_FOUND_FILE_TEMPLATE("rtplm_error_00005", "not.found.file.template"),


    //枚举值数据不存在异常
    ENUM_VALUE_NOT_EXIST("rtplm_error_00006","enum.value.not.exist"),
    CLASSIFICATION_TYPE_ERROR("rtplm_error_00007", "rtplm.classification.type.error"),
    OBJECTNUMBER_NOT_EXIST("rtplm_error_00008","objectnumbr.not.exist.error"),
    CATEGORY_MODIFICATION_FAILED("rtplm_error_00009","gategory.modification.error"),
    ENGRAVE_NOT_EXIST("rtplm_error_00010","engrave.not.exist.error"),
    DESCRIBE_RULE_ERROR("rtplm_error_00011","describe.rule.error"),
    GENERATE_CODE_ERROR("rtplm_error_00012","generate.code.error"),
    CLASSIFICATION_NOT_UNIQUE_ERROR("rtplm_error_00013", "rtplm.classification.not.unique.error"),
    CLASSIFICATION_MATCH_INVALID_ERROR("rtplm_error_00014", "rtplm.classification.match.invalid.error"),


    CLASSIFICATION_NOT_EXIST("rtplm_error_00017", "classification.not.exist.error"),
    SEND_SAP_EXCEPTION("rtplm_error_00018", "send.sap.exception"),
    // 用户在系统中不存在
    CHANGEREQUEST_INCOMPLETE_EXCEPTION("rtplm_error_00019", "changerequest.incomplete.exception"),
    PROJECT_DEV_ORDER("rtplm_error_00020", "project.dev.order.error"),
    WORK_FLOW_EXECUTE_EXCEPTION("rtplm_error_00021", "work.flow.execute.exception"),
    EXCEL_IMPORT_EXCEPTION("rtplm_error_00022", "excel.import.exception"),
    PROJECT_EXCE_ERROR("project_exce_error00001", "project.dev.order.error"),
    CUSTOM_EXCEPTION("12005", "ty_custom.exception"),

    //开发令或者机型已经存在的异常
    DEV_CODE_EXIST("rtplm_status_error_00001", "dev.code.exist.error"),
    DEV_CODE_NOT_UNIQUE("rtplm_status_error_00023", "dev.code.not.unique.error"),
    PRODUCT_TYPE_EXIST("rtplm_status_error_00002", "product.type.exist.error"),
    PART_TYPE_NOT_EXIST("rtplm_status_error_00024", "part.type.not.exist.error"),
    //需求状态表
    STATUS_INFO_CONTENT_IS_NULL("rtplm_status_error_00003", "status.info.content.error"),
    // 对象未找到流程模板
    NOT_FOUND_OBJECT_WORK_FLOW_TEMPLATE("yfmpm_error_000018", "not.found.object.work.flow.template"),
    USER_NOT_FOUND("yfmpm_error_000019", "user.not.found"),

    //搭建BOM
    ERECTION_OF_BOM("erection_of_bom_00001", "type.exception"),


    STATUS_NOT_RELEASED_ERROR("rtplm_error_00020", "status_not_released.error"),
    OBJECT_NOT_EXIST("rtplm_error_00023","object.not.exist.error"),
    CARD_NOT_EXIST("rtplm_error_00024","card.not.exist.error"),
    CHANGEINFO_NOT_EXIST("rtplm_error_00025","changeinfo.not.exist.error"),
    PART_NOT_EXIST("rtplm_error_00026","part.not.exist.error"),
    PART_DEV_NOT_EXIST("rtplm_error_00027","part.dev.not.exist.error"),
    TYPE_NOT_EXIST("rtplm_error_00028","type.not.exist.error"),
    ATTRIBUTE_CARD_DUPLICATION("rtplm_error_00029","card.duplication.exist.error"),
    ATTRIBUTE_CARD_EXIST_PART("rtplm_error_00030","card.exist.part.error"),
    CARD_EXIST_PART("rtplm_error_00031","card.exist.part.update.error"),
    PRJ_STATE_ERROR("rtplm_error_00032","prj.state.error"),
    COLLECTION_OBJECT_ERROR("rtplm_error_00033", "collection.object.error"),
    UPDATE_APPOINT_ERROR("rtplm_error_00035", "update.appoint.error"),
    UPDATE_BOM_ERROR("rtplm_error_00036", "update.bom.error"),
    UPDATE_MBOM_ERROR("rtplm_error_00037", "update.mbom.error"),
    UPDATE_MODULE_ERROR("rtplm_error_00038", "update.module.error"),
    COMPLETE_DRAW_ERROR("rtplm_error_00039", "complete.draw.error"),
    UPDATE_DESC_ERROR("rtplm_error_00040", "update.desc.error"),
    CHECK_EBOM_ERROR("rtplm_error_00041", "check.ebom.release.error"),
    //认证信息异常
    CERT_NAME_EXISTS("rtplm_error_cert_0001" ,"cert.name.exists.error"),
    DATA_NOT_EXISTS("rtplm_error_cert_0002" ,"cert.data.not.exists.error"),
    DATA_EXISTS("rtplm_error_cert_0005" ,"cert.data.exists.error"),
    CERT_FILED_EXISTS("rtplm_error_cert_0003" ,"cert.filed.exists.error"),
    CERT_CUSTOMER_EXISTS("rtplm_error_cert_0004" ,"cert.customername.exists.error"),
    //用户操作错误码
    UNKNOWN_ACTION("rtplm_error_00020", "unknown.action"),
    ISUUE_REPORT_IMPORE_ERROR("rtplm_error_00021", "issue.report.import.error")
    ;


    /**
     * 错误码
     */
    private String code;

    /**
     * 错误提示
     */
    private String msg;

    RTErrorCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }


    public RTErrorCodeEnum setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}